package com.klod.news.page

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import com.klod.news.config.RouteMain
import com.klod.news.utils.RouteManage
import com.klod.news.viewmodel.MainActivityVm
import org.koin.androidx.compose.koinViewModel

@Composable
fun ErrorScreen(vm: MainActivityVm = koinViewModel()){
    Box(modifier = Modifier.fillMaxSize()
    , contentAlignment = Alignment.Center
    ) {

        Button(onClick = {
            vm.setRoute(RouteManage.JumpTo(RouteMain))
        }) {Text("这是错误页面") }
    }


}